<html>
<head><meta charset="utf-8"><title>how to get string from TyKind · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20get.20string.20from.20TyKind.html">how to get string from TyKind</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207588219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/how%20to%20get%20string%20from%20TyKind/near/207588219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20get.20string.20from.20TyKind.html#207588219">(Aug 20 2020 at 23:58)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.TyKind.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.TyKind.html</a><br>
How do I get the textual representation of a TyKind (for printing in lint messages?)</p>



<a name="207588876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/how%20to%20get%20string%20from%20TyKind/near/207588876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20get.20string.20from.20TyKind.html#207588876">(Aug 21 2020 at 00:07)</a>:</h4>
<p>Why do you have a TyKind but no Ty?</p>



<a name="207589017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/how%20to%20get%20string%20from%20TyKind/near/207589017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20get.20string.20from.20TyKind.html#207589017">(Aug 21 2020 at 00:09)</a>:</h4>
<p>oh, can the ty do that? <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="207589756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/how%20to%20get%20string%20from%20TyKind/near/207589756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/how.20to.20get.20string.20from.20TyKind.html#207589756">(Aug 21 2020 at 00:22)</a>:</h4>
<p>I can simply .to_string() the expr_type   :D</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>